home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 1 / CU Amiga Magazine CD-ROM Special Edition (1995)(EMAP Images)(GB)[Issue 1995-11].iso / Aminet / comm / cnet / call_logger33.lha / call_log1 / Call_Logger < prev    next >
Text File  |  1995-06-11  |  12KB  |  117 lines

  1. /**************************************************************************\
  2.              $VER: Call Logger, v3.3 by Dotoran (11-Jun-95)
  3. \**************************************************************************/
  4. options results;signal on SYNTAX;signal on ERROR;signal on IOERR
  5. tr=transmit;se=sendstring;gc=getchar;gu=getuser
  6. /*************************************************************************\
  7.      SysOp Definable Variables: See the _READ_ME! file for more info!
  8. \*************************************************************************/
  9. V1  = "X"    /* Ignore these Port Numbers.  If X, log all Ports.         */
  10. V2  = "X"    /* Ignore these ID Numbers.    If X, log all ID Numbers.    */
  11. V3  = "X"    /* Ignore these Access Levels. If X, log all Accesses.      */
  12. V4  = 10     /* Max calls to log ever.  Will never exceed this value.    */
  13. V5  = 0      /* Save Call-Backs to the Log? ( 1 = Yes / 0 = No )         */
  14. V6  = 5      /* Log SysOp(ID1) only when (s)he makes this many calls.    */
  15. V7  = 2      /* Activity Flag Backdrop: 1:dots,  2:dashes, 3:lowercase,  */
  16.              /*                         4:stars, 5:sm. x's 6:equals'     */
  17. V8  = "#"    /* 7: Use Ascii character in V8 as filler when V7=7.        */
  18. V9  = 1      /* Allow Log to be Aborted.    ( 1 = Yes / 0 = No )         */
  19. V10 = 1      /* Call_Log Output Type.  ( 0 = Elaborate / 1 = Quick )     */
  20. V11 = 0      /* Call_Log Ordering. ( 0 = Newest 1st / 1 = Oldest 1st )   */
  21. V12 = "db"   /* Quick Log Entry Colors (The MCI code that follows c)    */
  22. V13 = 0      /* Notate Call_Log Ignores?    ( 0 = No / 1 = Yes )         */
  23. V14 = "c"    /* Quick Log Border Color. (The MCI code that follows c)   */
  24. V15 = 1      /* Clear Screen Before Displaying Log? (0=No, 1=Yes)        */
  25. D1  = "GFILES:"                   /* Where the Call_Log is stored.       */
  26. D2  = "PFILES:Call_Log1/"         /* Where Call_Logger files are stored. */
  27. /*************************************************************************\
  28.       The values of D1 and D2 should both end with either a : or a /
  29. \*************************************************************************/
  30. gu 23;port=result;gu 1;handle=result;gu 40;id=result;gu 15;access=result;gu 24;baud=left(result,2);total=V4;flag=0;bc="c"V14
  31. if index(v1,port)>0|index(v2,id)>0|index(v3,access)>0 then flag=1;if flag=1&V13=0 then exit;cs='';if V15=1 then cs='f1'
  32. if V10=0 then call DATA0;if V10=1 then call DATA1;call READCONFIG;call COMPUTERS;call READLOG;if index(lc.2,handle)>0&V5=0 then flag=1
  33. if id=1&sysopcalls<V6 then flag=1;else do;sysopcalls=0;call SAVECONFIG;end
  34. if flag=1&V13=0 then exit;gu 1100465;com=comp.result;gu 1400472;calls=result
  35. gu 1400476;posts=result;gu 1400488;uploads=result;se 'Call logging...';do i=1 to 9;a.i=0;end i;file='sysdata:Log/port'port
  36. call open(f1,file,'r');do j=1 until eof(f1);c.j=readln(f1);end j;call close(f1)
  37. do i=1 to j;if index(c.i,'SIGNON')>0   then key1=i;if index(c.i,'SIGNOFF')>0  then key2=i
  38. if index(c.i,'NEW USER')>0 then a.9=1;end i;if a.9=1 then new='*';else new=' '
  39. s1=substr(c.key1,11,5);s2=left(s1,2);hr='a';if s2>'11' then hr='p';if s2>'12' then s2=s2-12;if s2='00' then s2='12'
  40. s1=s2||substr(s1,3)hr;signon=right(s1,6);s1=substr(c.key2,11,5);s2=left(s1,2);hr='a';if s2>'11' then hr='p'
  41. if s2>'12' then s2=s2-12;if s2='00' then s2='12';s1=s2||substr(s1,3)hr;signoff=right(s1,6);key3=key2+1
  42. do i=key3 to j;if index(c.i,'po')>0 then a.1=1;if index(c.i,'re')>0 then a.2=1
  43. if index(c.i,'uf')>0 then a.3=1;if index(c.i,'df')>0 then a.4=1;if index(c.i,'pf')>0 then a.5=1;if index(c.i,'gf')>0 then a.6=1
  44. if index(c.i,'fb')>0 then a.7=1;if index(c.i,'ms')>0 then a.8=1;end i;if V10=0 then do;s1='ceP c9R cfU caD ceG c9T cfF caMcd]';s2=''
  45. if V7=1 then s2='c5. c5. c5. c5. c5. c5. c5. c5.cd]';if V7=2 then s2='c5- c5- c5- c5- c5- c5- c5- c5-cd]'
  46. if V7=3 then s2='c5p c5r c5u c5d c5g c5t c5f c5mcd]';if V7=4 then s2='c5* c5* c5* c5* c5* c5* c5* c5*cd]'
  47. if V7=5 then s2='c5x c5x c5x c5x c5x c5x c5x c5xcd]';if V7=6 then s2='c5= c5= c5= c5= c5= c5= c5= c5=cd]'
  48. if V7=7 then do;do i=1 to 8;s2=s2'c5'V8' ';end i;s2=strip(s2)'cd]';end;a1='cd['
  49. do i=1 to 8;act=act+a.i;if a.i=0 then a1=a1||word(s2,i,1);else a1=a1||word(s1,i,1);end i;if act=0 then a1='cd[ceNothing!cd]'
  50. log='z4 z0cfºcb'right(port,2)'cc 'center(id,3)' cf'new;log=log'ca'left(handle,20)'c9'left(baud,3)a1' c7'signon
  51. log=log' ce'signoff'ca'right(access,4)' c9'com;log=log'cd'right(calls,4)'cb'right(uploads,4)'ce'
  52. log=log||right(posts,4)'cfºz4 z0';if V13=1&flag=1 then do;log='z4 z0cfºcb'right(port,2)'cd ----caOccupiedcd---caFor'
  53. log=log'cd---caPrivatecd---caUsecd----c7 'signon' ce';log=log||signoff' cd-caPortcd-caUnAvailablecd- cfºz4 z0';end;end
  54. if V10=1 then do;s1='P R U D G T F M]';s2='';a1='[';if V7=1 then s2='. . . . . . . .]';if V7=2 then s2='- - - - - - - -]'
  55. if V7=3 then s2='p r u d g t f m]';if V7=4 then s2='* * * * * * * *]';if V7=5 then s2='x x x x x x x x]';if V7=6 then s2='= = = = = = = =]'
  56. if V7=7 then do;do i=1 to 8;s2=s2||V8' ';end i;s2=strip(s2)']';end;do i=1 to 8;act=act+a.i
  57. if a.i=0 then a1=a1||word(s2,i,1);else a1=a1||word(s1,i,1);end i;if act=0 then a1='[Nothing!]'
  58. log=' 'bc'ºc'co||right(port,2)' 'center(id,3)' 'new;log=log||left(handle,20)left(baud,3)a1' 'signon
  59. log=log' 'signoff||right(access,4)' 'com;log=log||right(calls,4)right(uploads,4)
  60. log=log||right(posts,4)bc'º';if V13=1&flag=1 then do;log=' 'bc'ºc'co||right(port,2)' ----Occupied---For---Private---'
  61. log=log'Use---- 'signon' 'signoff' -Port-UnAvailab';log=log'le- 'bc'º';end
  62. c=index(V12,co);if c=length(V12) then c=1;else c=c+1;co=substr(V12,c,1);end;call FB
  63. call open(f1,d1'Call_Log','w');do i=1 to 6;call writeln(f1,top.i);end i
  64. if V11=1 then do;start=1;if logged=total then start=2;do i=start to logged;call writeln(f1,lc.i);end i;call writeln(f1,log);end
  65. if V11=0 then do;end=logged;if logged=total then end=logged-1;call writeln(f1,log);do i=1 to end;call writeln(f1,lc.i);end i;end
  66. do i=1 to 4;call writeln(f1,bot.i);end i;call close(f1);logged=logged+1;if logged>total then logged=total
  67. call SAVECONFIG;call PR;tr 'h6ed!';exit
  68. COMPUTERS:;call FB;if exists(d2'Call_Log_Computers3') then do;call open(f1,d2'Call_Log_Computers3','r')
  69. do i=0 to ct-1;comp.i=readln(f1);end i;call close(f1);return;end;call open(f1,'cnet:bbsmenu','r');ct=0
  70. do until left(j,2)='30';j=readln(f1);end;do until r='';r=readln(f1);r=strip(substr(r,2))
  71. comp.ct=left(r,3);ct=ct+1;end;call close(f1);ct=ct-1;call SAVECONFIG;call open(f1,d2'Call_Log_Computers3','w')
  72. do i=0 to ct-1;call writeln(f1,comp.i);end i;call close(f1);call PR;return
  73. READLOG:;if exists(d1'Call_Log') then do;call open(f1,d1'Call_Log','r');do i=1 to 6;j=readln(f1);end
  74. do i=1 to logged;lc.i=readln(f1);end i;call close(f1);return;end;call FB;call open(f1,d1'Call_Log','w')
  75. do i=1 to 6;call writeln(f1,top.i);end i;call writeln(f1,mid.1);logged=1
  76. do i=1 to 4;call writeln(f1,bot.i);end i;call close(f1);call PR;call SAVECONFIG;signal READLOG
  77. READCONFIG:;if ~exists(d2'Call_Log_Config') then do;l=substr(V12,2,1);call FB
  78. call open(f1,d2'Call_Log_Config','w');call writeln(f1,'0  <--- Total Calls Logged')
  79. call writeln(f1,'0  <--- Total Computer Types');call writeln(f1,'0  <--- Total SysOp Calls')
  80. call writeln(f1,l'  <--- Next Quick Log Color');call close(f1);call PR;signal READCONFIG;end
  81. call open(f1,d2'Call_Log_Config','r');a=readln(f1);logged=word(a,1);a=readln(f1);ct=word(a,1)
  82. a=readln(f1);sysopcalls=word(a,1);a=readln(f1);co=word(a,1);call close(f1)
  83. if id=1 then do;sysopcalls=sysopcalls+1;call SAVECONFIG;end;return
  84. SAVECONFIG:;a1=left(logged,3)'<-- Total Calls Logged';a2=left(ct,3)'<-- Total Computer Types'
  85. a3=left(sysopcalls,3)'<-- Total SysOp Calls';a4=left(co,3)'<-- Next Quick Log Color'
  86. call FB;call open(f1,d2'Call_Log_Config','w');call writeln(f1,a1);call writeln(f1,a2)
  87. call writeln(f1,a3);call writeln(f1,a4);call close(f1);call PR;return
  88. DATA0:;act=0;ct=0;logged=0;sysopcalls=0;if V9=1 then top.1=cs'@4CÜÜÕÍ͸ÜÕÍ͸ÜÕ¸ÜÜÜÕ¸ÜÜÜÕÍ͸ÜÕÍ͸ÜÜÜÜÕ¸ÜÜÜÕÍ͸ÜÕÍ͸ÜÜ'
  89. if V9=0 then top.1=cs'a1@4CÜÜÕÍ͸ÜÕÍ͸ÜÕ¸ÜÜÜÕ¸ÜÜÜÕÍ͸ÜÕÍ͸ÜÜÜÜÕ¸ÜÜÜÕÍ͸ÜÕÍ͸ÜÜ'
  90. top.2='Cß     ³    ÆÍ͵ ³    ³    Æ͵  ÆÍѾ    ³    ³  ³ ³Õ͸     ß'
  91. top.3='          Ü ßßßßÔÍ;ßÔßß¾ßÔÍ;ßÔÍ;ßÔÍ;ßÔßÔ¾ßßßßÔÍ;ßÔÍ;ßÔÍ;ßßßß Ü          '
  92. top.4=' ÉÍÍÑÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÑÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÑÍÍÍÍÍÍÍÑÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍÍ» '
  93. top.5=" ºP#³ID#³*User's Handle *=New³Bd³Activities³SignOn³SignOff³AG³Com³CaT³UpL³Posº "
  94. top.6=' ÌÍÍÏÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÏÍÍÏÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÏÍÍÍÍÍÍÍÏÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍ͹ '
  95. bot.1=' ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ '
  96. bot.2='  P#=Port Bd=Baud AG=AccessGroup Com=Computer CaT=Calls UpL=Uploads Pos=Posts  '
  97. bot.3='   ActivitiesP:ost R:esponse U:pload D:ownload G:ame T:ext F:eedback M:ail   '
  98. bot.4='      Caller Log, v3.3 Written by: Dotoran of Frontiers BBS(716)/823-9892      '
  99. gu 12;start='Call Log Started On: 'left(result,15);mid.1='z4 z0cfº                    cb'start'                   cfºz4 z0';return
  100. DATA1:;act=0;ct=0;logged=0;sysopcalls=0;if V9=1 then top.1=cs'@4CÚÄ¿ÚÄ¿Ú  Ú  ÚÄ¿Ú¿    Ú  ÚÄ¿ÚÄ¿'
  101. if V9=0 then top.1=cs'a1@4CÚÄ¿ÚÄ¿Ú  Ú  ÚÄ¿Ú¿    Ú  ÚÄ¿ÚÄ¿'
  102. top.2=' 'bc'ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»³  ÃÄ´³  ³  Ã¿ ÃÁ¿   ³  ³ ³³Ú¿'bc'ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»'
  103. top.3=' ºCall Frontiers BBS!'bc'ºÀÄÙÀ ÙÀÄÙÀÄÙÀÄÙÀ À3.3ÀÄÙÀÄÙÀÄÙ'bc'º (716)/823-9892 (14400) 'bc'º'
  104. top.4=' ÌÍÍÑÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÑÍÍÑÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÑÍÊÍÍÍÍÍÑÍÍÑÍÍÍÑÍÍÍÑÍÍÍÑÍÍ͹'
  105. top.5=" ºP#"bc"³ID#"bc"³*User's Handle *=New"bc"³Bd"bc"³Activities"bc"³SignOn"bc"³SignOff"bc"³AG"bc"³Com"bc"³CaT"bc"³UpL"bc"³Pos"bc"º"
  106. top.6=' ÌÍÍÏÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÏÍÍÏÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÏÍÍÍÍÍÍÍÏÍÍÏÍÍÍÏÍÍÍÏÍÍÍÏÍÍ͹'
  107. bot.1=' ÌÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍ͹'
  108. bot.2=' ºP#=Port'bc'³Bd=Baud'bc'³AG=AccessGroup'bc'³Com=Computer'bc'³CaT=Calls'bc'³UpL=Uploads'bc'³Pos=Posts'bc'º'
  109. bot.3=' È»Activities:'bc'³P:ost'bc'³R:esponse'bc'³U:pload'bc'³D:ownload'bc'³G:ame'bc'³T:ext'bc'³F:eedback'bc'³M:ail'bc'ɼ'
  110. bot.4='  ÈÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÏÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÏÍÍÍÍͼ'
  111. gu 12;start='Call Log Started On: 'left(result,15);l=left(V12,1);mid.1=' 'bc'º                    c'l||start'                   'bc'º';return;FB:;return FORBID();PR:;return PERMIT()
  112. SYNTAX:;ERROR:;IOERR:;er=rc' c7<ce'errortext(rc)'c7> c6in line ca'sigl
  113. gu 1311992;a=result;gu 1311960;b=result;c='cb"cd'a||b'cb"';er='c9Error c6Code ca'er' c6of 'c'n2cf'
  114. er=er||sigl'ce: cb'sourceline(sigl);tr er;logentry er;bufferflush
  115. /** Last Edited: 11-Jun-95 ************************************************\
  116. \****************************************** FRONTIERS BBS (716)/823-9892 **/
  117.